<script setup lang="ts">
import { ref } from 'vue';

  var title1 = ref('')
  var title2 = ref('')
  const submit = () => {
    console.log(title1.value)
    console.log(title2.value)
    console.log(title1.value.value)
    console.log(title2.value.innerHTML)
  }
</script>
<template>
  <input ref="title1" type="text" value="admin">
  <h1 ref="title2">标题</h1>
  <button @click="submit">submit</button>
</template>
<style scoped></style>